<include file="Public:header" />
	<div class="container">
		<div class="page-header">
			<select id="select1" onchange="changeContent()">
				<option>{:L('SELECT_CONTENT_TO_VIEW')}</option>
				<option <if condition="ACTION_NAME eq 'index' and $Think.get.status eq null">selected="selected"</if> value="1">{:L('USER_INDEX')}</option>
				<option <if condition="ACTION_NAME eq 'index' and $Think.get.status eq '0'">selected="selected"</if> value="2">{:L('INACTIVE_USER')}</option>
				<option <if condition="ACTION_NAME eq 'department'">selected="selected"</if> value="4">{:L('DEPARTMENT_MGR')}</option>
				<option <if condition="ACTION_NAME eq 'role'">selected="selected"</if> value="5">{:L('POSITION_MGR')}</option>
			</select>
			
		</div>
		<include file="Public:alert" />
		<form action="{:U('user/role_delete')}" method="post">
		<div class="row">
			<div class="span12">
				<div class="bulk-actions align-left">
					<ul class="nav pull-left">					
						<li class="dropdown">
							<a href="#" class="btn dropdown-toggle" data-toggle="dropdown">{:L('VIEW_POSITION_BY_DEPARTMENT')}<b class="caret"></b></a>
							<ul class="dropdown-menu">
								<li><a href="javascript:void(0);" class="link" onclick="window.location='{:U('user/role')}'">--{:L('ALL')}--</a></li>
								<volist name="departmentList" id="vo">
									<li><a href="javascript:void(0);" class="link" onclick="window.location='{:U('user/role')}?department_id={$vo.department_id}'">{$vo.name}</a></li>
								</volist>
							</ul>
						</li> 
					</ul>
					&nbsp; <input type="submit" class="btn" value="{:L('DELETE')}"/>
					<div class="pull-right">
						<a  class="btn btn-primary" href="{:U('user/add')}">{:L('ADD_USER')}</a>
						&nbsp; <a id="add_department" class="btn btn-primary">{:L('ADD_DEPARTMENT')}</a>
						&nbsp; <a id="add_role" class="btn btn-primary">{:L('ADD_POSITION')}</a>
					</div>
				</div>
			</div>
			<div class="span12">
				<table class="table table-hover">
					<thead>
						<tr>
						   <th><input class="check_all" id="check_all" type="checkbox" /></th>
						   <th>{:L('POSITION_NAME')}</th>
						   <th>{:L('WHICH_DEPARTMENT_BELONGS_TO')}</th>
						   <th>{:L('USER')}</th>
						   <th>{:L('DESCRIPTION')}</th>
						   <th>{:L('OPERATING')}</th>
						</tr>
					</thead>
				 
					<tbody>
						<volist name="roleList" id="vo">
						<tr>
							<td><input type="checkbox" class="check_list" name="roleList[]" value="{$vo.role_id}"/></td>
							<td >{$vo.name}</td>
							<td >{$vo.department.name}</td>
							<td><if condition="$vo['user']['name']">{$vo.user.name}<else /><code>{:L('VACANCY')}</code></if></td>
							<td>{$vo.description}</td>
							<td>
								<a rel="{$vo.role_id}" href="javascript:void(0);" class="edit">{:L('EDIT')}</a>&nbsp;
								<a rel="{$vo.role_id}" href="javascript:void(0);" class="permission">{:L('ASSIGN_PERMISSIONS')}</a>&nbsp;
								<a rel="{$vo.role_id}" href="javascript:void(0);" class="user">{:L('ASSIGN_USER')}</a>
							</td>
						</tr>
						</volist>
					</tbody>
				</table>
			</div> <!-- End #tab1 -->
		</div>
		</form>
	</div>
<include file="Public:footer" />